UNLOCK Statement Action Releases locks applied to parts of a file. Syntax UNLOCK # filenumber% , { record& | start& TO end&} Remarks The UNLOCK statement is used only after a LOCK statement. See the entry for the LOCK statement for a complete discussion. The UNLOCK statement uses the following arguments. ----------------------------------------------------------------------------- Argument Description ---------------------------------------------------------------------------- filenumber% The number used in the OPEN statement to open the file. record& The number of the record or byte to be locked. The argument record& can be any number between 1 and 2,147,483,647 (equivalent to 231 -1), inclusive. A record can be up to 32,767 bytes in length. start& The number of the first record or byte to be locked. end& The number of the last record or byte to be locked.. For binary-mode files, record&, start&, and end& represent the number of a byte relative to the beginning of the file. The first byte in a file is byte 1. For random-access files, record&, start&, and end& represent the number of a record relative to the beginning of the file. The first record is record 1. Warning Be sure to remove all locks with an UNLOCK statement before closing a file or terminating your program. Failing to remove locks produces unpredictable results. The arguments to LOCK and UNLOCK must match exactly. Do not use LOCK and UNLOCK on devices or ISAM tables. See Also LOCK... UNLOCK Example See the LOCK... UNLOCK statement programming example, which uses the UNLOCK statement.